package org.come.bean;

import java.util.Map;

import org.come.model.LianHua;

/** 炼化 */
public class AllLianHua {

	private Map<Integer, LianHua> lianhuas;

	public AllLianHua(Map<Integer, LianHua> lianhuas) {
		super();
		this.lianhuas = lianhuas;
	}

	public Map<Integer, LianHua> getLianhuas() {
		return lianhuas;
	}

	public void setLianhuas(Map<Integer, LianHua> lianhuas) {
		this.lianhuas = lianhuas;
	}
	/**炼化类型控制*/
	public LianHua get1000(int num) {
		for (LianHua e : lianhuas.values()) {
			if (e.getType() == 1000) {
				if (e.getNum() == num) {
					return e;
				}
			}
		}
		return null;
	}
	/**炼化类型控制*/
	

	public LianHua get2000(int num) {
		for (LianHua e : lianhuas.values()) {
			if (e.getType() == 2000) {
				if (e.getNum() == num) {
				return e;
			}
		}
		}
		return null;
	}

	public LianHua get3000() {
		for (LianHua e : lianhuas.values()) {
			if (e.getType() == 3000) {
				return e;
			}
		}
		return null;
	}
}
